public class ExceptionExample {
    public void func(){
        int[] arr = {1,2,3,4,5};
        try{
            System.out.println(arr[100]);
        }catch(ArrayIndexOutOfBoundsException e){
            System.out.println("捕获到ArrayIndexOutOfBoundsException异常");
        }
    }

    public static void main(String[] args) {
        ExceptionExample exceptionExample = new ExceptionExample();
        exceptionExample.func();
        System.out.println(111);
    }
}
